#pragma once

#include <boost/shared_ptr.hpp>

#include <cm/client_server/common.hpp>
#include <cm/client_server/message.hpp>

namespace cm {
namespace client_server {
		
	//----------------------------------------------------------------------

	class participant
	{
	public:
		virtual ~participant() {}
	public:
		virtual const boost::guid& get_id() const = 0;
		virtual const std::string& get_name() const = 0;
	public: // events
		virtual void stop() = 0;
	public:
		virtual void deliver(const message& msg) = 0;
	public:
		virtual void handle_keep_alive_timer_and_status() = 0;
	public:
		virtual void handle_adv_file_dispatch(cm::client_server::raw_file_ptr ptr_adv_file) = 0;
		virtual void handle_adv_file_dispatch2(cm::client_server::raw_file_ptr ptr_adv_file,const cm::client_server::file_len& part) = 0;
	};

	typedef boost::shared_ptr<participant> participant_ptr;
}}